﻿#pragma once

#include <memory>
#include <vulkan/vulkan.hpp>

#include "Containers/Vector.h"

class RRenderContext;
class CGPURenderTarget;

class CAntiAliasingAttachments
{
public:
    CAntiAliasingAttachments(vk::Extent2D InViewportSize);
    ~CAntiAliasingAttachments();
    
    vk::Extent2D ViewportSize;


    //抗锯齿输出,目前没有后处理，所以这是最终输出
    //eR16G16B16A16Sfloat , for antialiasing
    std::shared_ptr<CGPURenderTarget> AntialiasingOutput; 


    vk::Framebuffer FrameBuffer;
    TVector<vk::ClearValue> ClearValues;

    //descriptor set include color attachments
    //used for composite subpass
    vk::DescriptorSet DescriptorSet;



    void PrepareSelfRecord();

    //传入之前渲染结果
    void CreateDescriptorSet(std::shared_ptr<CGPURenderTarget> InFormerColor);
};